const mongoose = require('mongoose')

const mongourl = 'mongodb://47.104.96.204:37000/kywebserver'
// const mongourl = 'mongodb://127.0.0.1:27017/kywebserver'

mongoose.connect(mongourl, {
  useNewUrlParser: true,
  keepAlive: true,
  poolSize: 10,
  useUnifiedTopology: true
}).then(() => {
  console.log('MongoDB Connected!')
}).catch(err => {
  console.log(err)
})

module.exports = mongoose
